<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>菜单管理</title> <#include "/WEB-INF/content/module-index.html">
<script type="text/javascript">
var sysStatus = {
		<#list map["status"] as sysStatus>
		<#if sysStatus_index!=0>
		,
		</#if>
          "${sysStatus.ecode}":"${sysStatus.ename}"
		</#list>
};
function statusFormatter(value,rowData,rowIndex){
 	if(value&&value!="")
	return eval("sysStatus."+value);
	else
		return "未知"; 
}
function open(value){
	var selectItemId = getSelectItemId();
	var row = getSelectItem();
	if (selectItemId)
		top.openModule("sys_module", row.name +"-[模块管理]",  "${request.contextPath}/sys/module/"
				+ selectItemId +"/index");
}
function levelFormatter(value,rowData,rowIndex){
	return "<a class=\"function_11\" href=\"javascript:open('"+value+"')\">模块管理</a>";
}
</script>
<style type="text/css">
.function_11 {
	display: block;
	height: 20px;
	line-height: 20px;
	cursor: pointer;
	text-decoration: none;
}
</style>
</head>
<body>
<body class="easyui-layout">
	<div region="center" style="padding: 5px; background: #eee;">
		<div id="toolbar">
			<@auth code="sys:menu:new"><a href="#" class="easyui-linkbutton"
				plain="true" iconCls="icon-add" style="border: 1px solid #ccc"
				onclick="javascript:add()">新增</a> </@auth> <@auth
			code="sys:menu:*:edit"> <a href="#" class="easyui-linkbutton"
				plain="true" iconCls="icon-edit" style="border: 1px solid #ccc"
				onclick="javascript:edit()">编辑</a></@auth> <@auth
			code="sys:menu:*:delete"> <a href="#" class="easyui-linkbutton"
				plain="true" iconCls="icon-remove" style="border: 1px solid #ccc"
				onclick="javascript:del()">删除</a></@auth> <@auth
			code="sys:menu:*:destroy"> <a href="#" class="easyui-linkbutton"
				plain="true" iconCls="icon-remove" style="border: 1px solid #ccc"
				onclick="javascript:destroy()">销毁</a></@auth>
		</div>
		<table id="grid" class="easyui-datagrid" url="query" idField="code"
			rownumbers="true" striped="true" fitColumns="true" fit="true"
			pagination="true" singleSelect="true" toolbar="#toolbar">
			<thead>
				<tr>
					<th field="code" width="100">编码</th>
					<th field="name" width="50">标题</th>
					<th field="parent" width="50">父菜单</th>
					<th field="sort" width="10">排序</th>
					<th field="status" width="10" align='center'
						formatter="statusFormatter">状态</th>
						<@auth code="sys:function:*:index">
					<th field="level" width="30" align='center'
						formatter="levelFormatter">操作</th></@auth>
					<th field="create_time" width="20" align='center'>创建时间</th>
				</tr>
			</thead>
		</table>
	</div>
</body>
</body>

</html>